package com.bwie.controller;

import com.bwie.service.TbOrderService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description :
 * @Author QiHainan
 * @Create 2025/4/21 16:04
 * @Version 1.0
 */
@RestController
@RequestMapping("/order/index")
public class IndexController {
    @Autowired
    TbOrderService tbOrderService;

    /**
     * 根据Id查询订单信息
     * @param orderId
     * @return
     */
    @PostMapping("/getOrderByOrderId/{orderId}")
    public R getOrderByOrderId(@PathVariable("orderId") Integer orderId){
        return tbOrderService.getOrderByOrderId(orderId);
    }
}
